"""
get请求，参数可以直接拼接在url后，也可以写在params中
"""

"""
案例一：【带查询参数的get请求】使用requests库，请求tpshop商城搜索商品接口，查询iPhone
"""
import requests
class Test:

    def test_serch(self):
        # verify=False跳过证书验证
        resp = requests.get(url='http://123.57.228.35/Home/Goods/search.html',params={'q':'iphone'})
        print(resp.text)

    def test_serch02(self):
        # verify=False跳过证书验证
        resp = requests.get(url='http://123.57.228.35/Home/Goods/search.html?q=iphone')
        print(resp.text)